using Alert.Services;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;

namespace Alert.ViewModels;

public partial class MainPageViewModel : ObservableObject {
    private readonly IAlertService _alertService;

    public MainPageViewModel(IAlertService alertService) {
        _alertService = alertService;
    }

    [RelayCommand]
    private void Alert() {
        _alertService.Alert("This is an alert.");
    }
}